package com.nativescan

import com.facebook.react.BaseReactPackage
import com.facebook.react.bridge.NativeModule
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.module.model.ReactModuleInfo
import com.facebook.react.module.model.ReactModuleInfoProvider

class NativeScanPackage:BaseReactPackage() {
    override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule?=
        if (name==NativeScan.NAME){
             NativeScan(reactContext)
        }else{
            null
        }


    override fun getReactModuleInfoProvider()= ReactModuleInfoProvider {
        mapOf(NativeScan.NAME to ReactModuleInfo(
            name = NativeScan.NAME,
            className = NativeScan.NAME,
            canOverrideExistingModule = false,
            needsEagerInit = false,
            isCxxModule = false,
            isTurboModule = true
        ))
    }
}